#pragma once
#include "CSMSTasker.h"

class CFactory : public IClassFactory
{
public:
	CFactory();
	~CFactory();

	// IUnknown
	STDMETHOD (QueryInterface)(REFIID iid, LPVOID *ppv);
	STDMETHOD_(ULONG, AddRef)();
	STDMETHOD_(ULONG, Release)();

	// IClassFactory interfaces
	STDMETHOD (CreateInstance)(IUnknown *pUnknownOuter, const IID& iid, LPVOID *ppv);
	STDMETHOD (LockServer)(BOOL bLock);

private:
	long m_cRef;
	int g_cServerLocks;
};